// 循环引用
function objGroup(obj1, obj2) {
  obj1.next = obj2;
  obj2.prev = obj1;

  return { o1: obj1, o2: obj2 };
}

let obj = objGroup({ name: 'obj1' }, { name: 'obj2' });
console.log('obj==>', obj);

delete obj.o1;
delete obj.o2.prev;

// 这个时候 obj1 就会被回收，因为无法找到他了